#include <math.h>
#include "stdint.h"

#ifndef ALGO_FILTER_SMOOTH_MAX
#define ALGO_FILTER_SMOOTH_MAX 32
#endif
typedef struct algoFilterSmooth
{
    // public
    void (*Push)(struct algoFilterSmooth* this, uint32_t data);
    uint32_t (*Get)(struct algoFilterSmooth* this);
    // private
    uint32_t len;
    uint32_t buf[ALGO_FILTER_SMOOTH_MAX];
    uint32_t *itr;
} algoFilterSmooth;

void algoFilterSmoothInit(algoFilterSmooth* algo, uint32_t avgDepth);
